home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / PERSONAL.{41 < prev    next >
Text File  |  1999-09-17  |  2KB  |  55 lines

  1. #ifndef _PERSONALITY_H
  2. #define _PERSONALITY_H
  3.  
  4. #include <linux/linkage.h>
  5. #include <linux/ptrace.h>
  6.  
  7.  
  8. /* Flags for bug emulation. These occupy the top three bytes. */
  9. #define STICKY_TIMEOUTS        0x4000000
  10. #define WHOLE_SECONDS        0x2000000
  11. #define ADDR_LIMIT_32BIT    0x0800000
  12.  
  13. /* Personality types. These go in the low byte. Avoid using the top bit,
  14.  * it will conflict with error returns.
  15.  */
  16. #define PER_MASK        (0x00ff)
  17. #define PER_LINUX        (0x0000)
  18. #define PER_LINUX_32BIT        (0x0000 | ADDR_LIMIT_32BIT)
  19. #define PER_SVR4        (0x0001 | STICKY_TIMEOUTS)
  20. #define PER_SVR3        (0x0002 | STICKY_TIMEOUTS)
  21. #define PER_SCOSVR3        (0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS)
  22. #define PER_WYSEV386        (0x0004 | STICKY_TIMEOUTS)
  23. #define PER_ISCR4        (0x0005 | STICKY_TIMEOUTS)
  24. #define PER_BSD            (0x0006)
  25. #define PER_XENIX        (0x0007 | STICKY_TIMEOUTS)
  26. #define PER_LINUX32        (0x0008)
  27.  
  28. /* Prototype for an lcall7 syscall handler. */
  29. typedef void (*lcall7_func)(struct pt_regs *);
  30.  
  31.  
  32. /* Description of an execution domain - personality range supported,
  33.  * lcall7 syscall handler, start up / shut down functions etc.
  34.  * N.B. The name and lcall7 handler must be where they are since the
  35.  * offset of the handler is hard coded in kernel/sys_call.S.
  36.  */
  37. struct exec_domain {
  38.     const char *name;
  39.     lcall7_func handler;
  40.     unsigned char pers_low, pers_high;
  41.     unsigned long * signal_map;
  42.     unsigned long * signal_invmap;
  43.     struct module * module;
  44.     struct exec_domain *next;
  45. };
  46.  
  47. extern struct exec_domain default_exec_domain;
  48.  
  49. extern struct exec_domain *lookup_exec_domain(unsigned long personality);
  50. extern int register_exec_domain(struct exec_domain *it);
  51. extern int unregister_exec_domain(struct exec_domain *it);
  52. asmlinkage int sys_personality(unsigned long personality);
  53.  
  54. #endif /* _PERSONALITY_H */
  55.